<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <html>

    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>菜品信息管理</title>
        <script src="http://10.222.29.156:3456/js/jquery-3.2.1.js"></script>
        <link rel="stylesheet" href="http://10.222.29.156:3456/css/bootstrap.css">
        <link rel="stylesheet" href="http://10.222.29.156:3456/css/bootstrap-theme.css">
        <script src="http://10.222.29.156:3456/js/bootstrap.js"></script>
    </head>

    <body style="font-size: 16px; background-image: url(http://10.222.29.156:3456/images/home10.jpg);">
        <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
            <div class="container-fluid" style="margin-left: 20%; margin-right: 20%;">
                <!-- Brand and toggle get grouped for better mobile display -->
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
					<span class="sr-only">Toggle navigation</span> <span
						class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
                    <a class="navbar-brand" href="/o2o-merchant/sec/home">M 系统</a>
                </div>

                <!-- Collect the nav links, forms, and other content for toggling -->
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <ul class="nav navbar-nav">
                        <li><a href="/o2o-merchant/sec/home">首页</a></li>
                        <li class="active"><a href="/o2o-merchant/sec/food">菜品管理</a></li>
                        <li><a href="/o2o-merchant/sec/order">订单信息</a></li>
                        <li><a href="/o2o-merchant/sec/advertisement">广告信息</a></li>
                        <li><a href="/o2o-merchant/sec/commentary">评论信息</a></li>

                    </ul>
                    <ul class="nav navbar-nav navbar-right">
                        <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><span><img id="userPortrait" width="30px" height="30px" class="img-circle"></img></span> <span
							class="caret"></span></a>
                            <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
                                <li class="divider"></li>
                                <li><i class="icon-arrow-right"></i><a href="/o2o-merchant/sec/merchant">详情</a></li>
                                <li><i class="icon-arrow-right"></i><a href="/o2o-merchant/sec/exit.action">退出</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
                <!-- /.navbar-collapse -->
            </div>
            <!-- /.container-fluid -->
        </nav>
        <!--首页-->
        <div class="concontainer " style=" margin-top: 2%;">
            <div class="col-md-offset-1 col-md-10">
                <div class="well center-block">
                    <div class="panel panel-success" >
                        <div class="panel-heading" align="center">
                            <h3>菜品列表详情</h3>
                        </div>
                        <div class="panel-body" id="foodList" style="height: 680px; overflow:auto">
                            
                        </div>
                        <div class="panel-heading" align="center">
                            <p><a type="button" class="btn btn-success" data-target="#addModel" data-toggle="modal">添加菜品</a></p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- Modal box -->
        <div class="modal fade" id="updateModel" tabindex="-1" role="dialog" aria-labelledby="updateModelLabel">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="panel panel-success">
                        <div class="panel-heading" align="center">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <h3 class="modal-title" id="updateModelLabel">更新菜品</h3>
                            </div>
                        </div>
                        <div class="panel-body">
                            <div class="modal-body">
                                <form class="form-horizontal " id="updateFoodForm">
                                    <input type="hidden" id="hiddenId" name="id">
                                    <div class="form-group ">
                                        <label class="col-md-3 control-label">菜&nbsp; &nbsp; &nbsp;  &nbsp;名</label>
                                        <div class="col-md-8 ">
                                            <input type="text" id="foodName2" name="name" autocomplete="off" required>
                                        </div>
                                    </div>
                                    <div class="form-group ">
                                        <label class="col-md-3 control-label">类&nbsp; &nbsp; &nbsp;  &nbsp;型 </label>
                                        <div class="col-md-8">
                                            <select class="form-control" name="foodTypeId" autocomplete="off" required>
		                                </select>
                                        </div>
                                    </div>
                                    <div class="form-group ">
                                        <label class="col-md-3 control-label">价&nbsp; &nbsp; &nbsp;  &nbsp;格 </label>
                                        <div class="col-md-8">
                                            <input type="number" class="form-control" id="price" name="price" autocomplete="off" required>
                                        </div>
                                    </div>
                                    <div class="form-group ">
                                        <label class="col-md-3 control-label">照&nbsp; &nbsp; &nbsp;  &nbsp;片 </label>
                                        <div class="col-md-8">
                                            <input type="file" name="image" id="updateImage" >
                                        </div>

                                    </div>
                                </form>
                            </div>
                        </div>
                        <div class="panel-heading" align="center">
                            <div class="modal-footer">
                                <div class="col-md-offset-4 col-md-1 ">
                                    <button type="submit" class="btn btn-default" id="updateFoodBtn">更新</button>
                                </div>
                                <div class="col-md-offset-1 col-md-1">
                                    <button class="btn btn-default" data-dismiss="modal">返回</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- Modal box -->
        <div class="modal fade" id="recommendModal" tabindex="-1" role="dialog" aria-labelledby="updateModelLabel">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="panel panel-success">
                        <div class="panel-heading" align="center">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <h3 class="modal-title" id="recommendModelLabel">推荐菜品</h3>
                            </div>
                        </div>
                        <div class="panel-body">
                            <div class="modal-body">
                                <form class="form-horizontal " id="recommendForm">
                                    <input type="hidden" name="foodId" id="hiddenFoodId">
                                    <div class="form-group ">
                                        <label class="col-md-3 control-label">拍&nbsp; &nbsp; &nbsp;  &nbsp;价 </label>
                                        <div class="col-md-8">
                                            <input type="number" class="form-control"  name="compPrice" autocomplete="off">
                                        </div>
                                    </div>
                                    <div class="form-group ">
                                        <label class="col-md-3 control-label">描&nbsp; &nbsp; &nbsp;  &nbsp;述 </label>
                                        <div class="col-md-8">
                                            <textarea type="text" class="form-control" id="address" name="applyReason" placeholder="描述菜品,不超过50字" autocomplete="off" rows="3"></textarea>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <div class="panel-heading" align="center">
                            <div class="modal-footer">
                                <div class="col-md-offset-4 col-md-1 ">
                                    <button type="submit" class="btn btn-default" id="recommendBtn">推荐</button>
                                </div>
                                <div class="col-md-offset-1 col-md-1">
                                    <button class="btn btn-default" data-dismiss="modal">返回</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- add Modal -->
        <div class="modal fade" id="addModel" tabindex="-1" role="dialog" aria-labelledby="updateModelLabel">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="panel panel-success">
                        <div class="panel-heading" align="center">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <h3 class="modal-title" id="updateModelLabel">添加菜品</h3>
                            </div>
                        </div>
                        <div class="panel-body">
                            <div class="modal-body">
                                <form class="form-horizontal " id="addFoodForm" enctype="multipart/form-data">
                                    <div class="form-group ">
                                        <label class="col-md-3 control-label">菜&nbsp; &nbsp; &nbsp;  &nbsp;名</label>
                                        <div class="col-md-8 ">
                                            <input type="text" class="form-control"  name="name" autocomplete="off" required>
                                        </div>
                                    </div>
                                    <div class="form-group ">
                                        <label class="col-md-3 control-label">类&nbsp; &nbsp; &nbsp;  &nbsp;型 </label>
                                        <div class="col-md-8">
                                            <select class="form-control" name="foodTypeId" autocomplete="off" required>
		                                    </select>
                                        </div>
                                    </div>
                                    <div class="form-group ">
                                        <label class="col-md-3 control-label">价&nbsp; &nbsp; &nbsp;  &nbsp;格 </label>
                                        <div class="col-md-8">
                                            <input type="number" class="form-control" name="price" autocomplete="off" required>
                                        </div>
                                    </div>
                                    <div class="form-group ">
                                        <label class="col-md-3 control-label">照&nbsp; &nbsp; &nbsp; &nbsp;片 </label>
                                        <div class="col-md-8">
                                            <input type="file" name="image" id="addImage" required>
                                        </div>

                                    </div>
                                </form>
                            </div>
                        </div>
                        <div class="panel-heading" align="center">
                            <div class="modal-footer panel-heading">

                                <div class="col-md-offset-4 col-md-1 ">
                                    <button type="submit" class="btn btn-default" id="addFoodBtn">添加</button>
                                </div>
                                <div class="col-md-offset-1 col-md-1">
                                    <button class="btn btn-default" data-dismiss="modal">返回</button>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>

        <script src="/o2o-merchant/js/food.js"></script>



    </body>

    </html>